package com.aiwu.memory;

import android.view.View;

import com.aiwu.BaseLazyFragment;

import org.citra.citra_emu.R;

/**
 * 模糊搜索
 * 回游戏改数值后的界面
 */
public class MemoryFuzzyBackGameFragment extends BaseLazyFragment implements View.OnClickListener {
    private static final String TAG = MemoryFuzzyBackGameFragment.class.getName();

    @Override
    protected void lazyLoad() {

    }

    @Override
    protected int initContentView() {
        return R.layout.fragment_memory_back_game_fuzzy;
    }

    @Override
    protected void initView(View view) {
        view.findViewById(R.id.tv_bigger).setOnClickListener(this);
        view.findViewById(R.id.tv_smaller).setOnClickListener(this);
        view.findViewById(R.id.tv_changed).setOnClickListener(this);
        view.findViewById(R.id.tv_no_change).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_bigger:
                MemoryManager.getInstance().searchMemoryFuzzy(MemoryManager.SCAN_TYPE_BIGGER);
                break;
            case R.id.tv_smaller:
                MemoryManager.getInstance().searchMemoryFuzzy(MemoryManager.SCAN_TYPE_SMALLER);
                break;
            case R.id.tv_changed:
                MemoryManager.getInstance().searchMemoryFuzzy(MemoryManager.SCAN_TYPE_CHANGED);
                break;
            case R.id.tv_no_change:
                MemoryManager.getInstance().searchMemoryFuzzy(MemoryManager.SCAN_TYPE_NO_CHANGE);
                break;
        }
    }
}
